home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_lag_proptake.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  106 lines

  1. # Jones 3D Cog Script
  2. #
  3. # converted from item_Propeller.cog
  4. #
  5. # [RT & DS & MR]
  6. #
  7. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ===================================================================
  10.  
  11. symbols
  12.  
  13. message    startup
  14. message    activate
  15.  
  16. thing        Prop
  17. thing        indyactor
  18. thing        campos
  19. thing        player                        local
  20. int        bin=94                        local
  21. int        showing=0                        local
  22. int        curcam                        local
  23. keyframe    pullit=in_uw_pullswitch.key            local
  24. keyframe    in_smack=0in_uw_hammer.key            local
  25. keyframe    in_swim=in_uw_float.key                local
  26.  
  27. # --------- Hammer hand ---------------------
  28.     model        hammerhnd=hand_in_hammer.3do        local
  29.     int        swapRef                    local
  30. sound        smakit=lag_hammer_uw.wav            local
  31. sound        creaky=lag_propcreak_c.wav            local
  32. sound        breakit=lag_propbreak_c.wav            local
  33.  
  34.  
  35. end
  36.  
  37. # ===================================================================
  38.  
  39. code
  40.  
  41. startup:
  42.     player = GetLocalPlayerThing();
  43.     return;
  44.  
  45. activate:
  46.     if(GetSenderRef() != Prop) return;
  47.     curCam = GetCurrentCamera();
  48.     SetThingFlags(player, 0x80000);
  49.     SetActorFlags(player, 0x200000);
  50.     CopyPlayerHolsters(player, indyactor);
  51.     ClearThingFlags(indyactor, 0x80000);
  52.     StartCutscene(0);
  53.     SetCameraLookInterp(2, 0);            # turns off interp to lookthing.
  54.     SetCameraFocus(2, campos);
  55.     SetCameraSecondaryFocus(2, indyactor);
  56.     SetCurrentCamera(2);
  57.     SetCameraFOV(90, 0, 0);                # makes sure set to default.
  58.         
  59.     if (GetCurItem(player) == 93)                #hammer.
  60.     {
  61.  
  62.     # Put the hammer in Indy's hand (15 is his right hand mesh)
  63.     swapRef = SetThingMesh(indyactor, 15, hammerhnd, 0);
  64.  
  65.         PlayKey(indyactor, in_swim, 4, 0x14, 0);
  66.         PlayKey(indyactor, in_smack, 10, 0x12, 0);
  67.         sleep(1.5);
  68.         PlaySoundThing(smakit, Prop, 1.0, 25, 50, 0);
  69.         sleep(1.0);
  70.         PlaySoundThing(smakit, Prop, 1.0, 25, 50, 0);
  71.         sleep(1.0);
  72.         PlaySoundThing(smakit, Prop, 1.0, 25, 50, 0);
  73.         sleep(0.5);        
  74.         PlaySoundThing(breakit, Prop, 1.0, 15, 30, 0);
  75.         DestroyThing(Prop);
  76.         sleep(0.5);
  77.         ChangeInv(player, bin, 1.0);
  78.         SetInvAvailable(player, bin, 1);
  79.         JonesInvItemChanged(bin);
  80.     }
  81.     else
  82.     {
  83.         PlayKey(indyactor, pullit, 4, 0x12, 0);
  84.         sleep(1.5);
  85.         PlaySoundThing(creaky, Prop, 1.0, 15, 30, 0);
  86.         sleep(2.0);
  87.         print("Propeller is stuck");
  88.     }
  89.  
  90.     EndCutscene();
  91.     SetCurrentCamera(curCam);
  92.     SetThingFlags(indyactor, 0x80000);
  93.     ClearActorFlags(player, 0x200000);
  94.     ClearThingFlags(player, 0x80000);
  95.  
  96.     return;
  97.  
  98. end
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.